package com.hxd.service;


import com.hxd.dao.*;
import com.hxd.pojo.*;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class DepartmentServiceImpl implements DepartmentService {
    @Resource
    DepartmentDao departmentDao;
    //查询素有部门
    public List<Department> selectAlldepartment() {
        List<Department> departments = departmentDao.selectAlldepartment();
        return  departments;
    }

    //根据id 查找部门
    public Department selectOnedepartment(int id) {
        return departmentDao.selectOnedepartment(id);
    }
}
